<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            background-color: red;
            position: relative;
            /* 循环 */
            animation: infinite;
            /* 指向自定义frame */
            animation-name: move;
            /* 动画时间 */
            animation-duration: 4s;
        }

        @keyframes move {
            0% {
                background-color: red;
                left: 0;
                top: 0;
            }
            25% {
                background-color: yellow;
                left: 200px;
                top: 0;
            }
            50% {
                background-color: blue;
                left: 200px;
                top: 200px;
            }
            75% {
                background-color: green;
                left: 0;
                top: 200px;
            }
            100% {
                background-color: red;
                left: 0;
                top: 0;
            }
        }
    </style>
</head>
<body>
<div></div>
</body>
</html>